Learn R Programming

operators (version 0.1-7)

character decorator: Creates string decorators by repeating a pattern

Description

Creates string decorators by repeating a pattern either a given number of times or so that it takes a given number of character

Usage

txt %x=% n
txt %x=|% length.out
strrep( txt, n, length.out=getOption("width") )

Arguments

Value

A character string

See Also

paste, sprintf, rep

Examples

Run this code
"=" %x=% 80
"<-+->" %x=|% 80
strrep( ".-", n = 10 )
strrep( ".-", length.out = 50 )
strrep( ".-" )

Run the code above in your browser using DataLab